/**
 * 
 * ETH AI GAME LIBRARY
 * 
 * Author: Michael Jaworski
 * Copyright (c) Michael Jaworski 2010
 * http://code.google.com/p/eth/
 * 
 * Licence Agreement
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *	
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 */

package lib.eth.core.events
{
	import flash.events.Event;
	
	/**
	 * All EthEvents (in other systems - in the lib.eth.systems package) offer an Event
	 * class to report on their activity, they will inherit from the EthEvent
	 * class. 
	 * 
	 * In this way you can use common code to capture events from multiple systems.
	 *
	 * Note that extended event classes may add more constants, but these are provided
	 * so capturing can be common to all EthEvent classes.
	 * 
	 * Note not all event classes that Extend EthEvent may dispatch these events, see
	 * the individual documentation for a list of which event constants are used.
	 * 
	 * @version 0.1
	 * 
	 */ 	
	public class EthEvent extends Event
	{
		/**
		 * dispatched after the system has been initialized (start'ed' - up). after this
		 * event you can assume the system (or Eth class) is ready to be used
		 */ 
		public static const STARTUP:String = 'eth_startup';
		
		/**
		 * dispatched after the system has been cleaned. after this event is dispatched
		 * you should not call any methods on the object, and assume that the class
		 * can be kept, but any memory it used is emptied
		 */ 
		public static const SHUTDOWN:String = 'eth_shutdown';
		
		/**
		 * dispatched not necessarily on an update method (although many Eth classes have them)
		 * but when the object has completed its purposed work - this may be in a method other
		 * than update. 
		 * 
		 * refer to class documentation 
		 */ 
		public static const UPDATE:String = 'eth_update';
				
		/**
		 * identical to the constructor for the Event class
		 * 
		 * @see flash.events.Event
		 */ 
		public function EthEvent (type:String, bubbles:Boolean = false, cancelable:Boolean = false)
		{
			super (type, bubbles, cancelable);
		}
		
		/**
		 * identical to the clone method for the Event class
		 * 
		 * @see flash.events.Event
		 */ 
		[Override]
		override public function clone () : Event
		{
			return new EthEvent (type, bubbles, cancelable);
		}
	}
}